﻿/*============================================
 * 类名 :ProveNode
 * 描述 :用来存储推理过程树的节点
 *   
 * 创建时间: 2009-11-3 15:38:55
 *============================================*/
using System;
using System.Collections.Generic;

using System.Text;
using System.ComponentModel;

namespace 命题证明
{
    /// <summary>推理节点</summary>
    class ProveNode 
    {
        public ProveNode( Expression result )
            : this( result, new List<ProveNode>(), "前提引入" ) { }

        public ProveNode( Expression result, List<ProveNode> previous, string proveName )
        {
            this.Result = result;
            this.Previous = previous;
            this.ProveName = proveName;
        }

        /// <summary>从上一步到这一步，运算定律叫什么名字</summary>
        public string ProveName { get; set; }

        /// <summary>这步操作的前一步</summary>
        public List<ProveNode> Previous { get; set; }

        /// <summary>从这个节点存储的结论</summary>
        public Expression Result { get; set; }


        public override string ToString()
        {
            return Result.ToString() + "  " + ProveName;
        }

      
    }
}
